package com.windgo.service;

import com.github.pagehelper.PageInfo;

import com.windgo.bean.MarketAdminUpdateAdminVo;
import com.windgo.bean.*;
import com.windgo.bean.bo.PermissionsBO;
import com.windgo.bean.common.BasePageInfo;
import com.windgo.bean.common.BasePageInfo1;
import com.windgo.bean.common.CommonData;

import com.windgo.bean.MarketAdmin;
import com.windgo.bean.MarketRole;
import com.windgo.bean.MarketStorage;
import com.windgo.bean.bo.RoleCreateBO;
import com.windgo.bean.vo.*;


import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author stone
 * @date 2022/09/06 11:44
 */
public interface AdminService {
    MarketAdmin queryById(Integer id);

    void modify(MarketAdmin admin);

    List<MarketAdmin> query(String username, String password, String[] avatars, Integer page, Integer limit);

    PageInfo<MarketStorage> listStorage(BasePageInfo basePageInfo, String key, String name);

    int createStorage(MarketStorage marketStorage);

    MarketStorage queryMarketStorage(Integer id);


    CommonData<MarketAdmin> list(BasePageInfo info, String username);

    /**
     * admin-top-list
     * @param info
     * @return
     */
    CommonData<MarketTopic> topicList(BasePageInfo info);

    /**
     * admin-topic-create
     * @param marketTopic
     * @return
     */
    MarketTopicVo insertTopic(MarketTopic marketTopic);

    /**
     * sadmin-topic-read
     * @param id
     * @return
     */
    MarketGoodsDataEntity selectGoodsAndTopicById(Integer id);

    /**
     * admin-topic-update
     * @param marketTopic
     * @return
     */
    MarketTopic updateTopic(MarketTopic marketTopic);

    /**
     * admin-topic-delete
     * @param id
     * @return
     */
    int deleteMarketTopicById(Integer id);

    /**
     * admin-admin-list
     * @param info
     * @return
     */
    CommonData<MarketAdminAdminListVo> selectAdminList(BasePageInfo info);

    /**
     * admin-admin-create
     * @param adminListVo
     * @return
     */
    MarketAdminAdminCreateVo insertAdmin(MarketAdminAdminCreateVo adminListVo);

    /**
     * admin-log-list
     * @param info
     * @return
     */
    CommonData<MarketLog> selectLogList(BasePageInfo info);


    int deleteStorage(MarketStorage marketStorage);

    int updateStorage(MarketStorage marketStorage);

    MallInfoVO mallInfo();

    int updateMallConfig(MallInfoVO mallInfoVO);

    ExpressInfoVO expressInfo();

    int updateExpressConfig(ExpressInfoVO expressInfoVO);

    OrderInfoVO orderInfo();

    int updateOrderConfig(OrderInfoVO orderInfoVO);

    WxInfoVO wxInfo();

    int updateWxConfig(WxInfoVO wxInfoVO);

    List<StatInnerUser> statUser();

    List<StatInnerOrder> statOrder();

    List<StatInnerGoods> statGoods();

    PageInfo<MarketRole> listRole(BasePageInfo basePageInfo, String name);

    MarketRole queryMarketRole(Integer id);

    int createRole(RoleCreateBO createBO);


    int deleteAdmin(MarketAdmin admin, MarketAdmin marketAdmin);

    MarketAdminUpdateAdminVo updateAdmin(MarketAdminAdminCreateVo adminCreateVo);

    CommonData<MarketIssue> selectAllIssue(BasePageInfo info);

    MarketCreateIssueVo createIssue(MarketIssue marketIssue);

    MarketCreateIssueVo updateIssue(MarketCreateIssueVo issuePo);

    int deleteIssueById(MarketCreateIssueVo issueBo);

    int updateRole(MarketRole marketRole);

    int deleteRole(MarketRole marketRole);

    List<RoleOptionsVO> optionsRole();

    RolePermissionVO queryPermission(String roleId);


    ArrayList<String> selectNameByUsername(Integer[] roleIds);

    ArrayList<String> selecPermissionsByUsername(Integer[] roleIds);


    int deleteBatch(List<Integer> ids);

    void updateIpAndLastLoginTime(String ip, Date date, Integer id);

    CommonData<MarketAdminAdminListVo> selectAdminList1(BasePageInfo1 info);


    ArrayList<String> selectPermissionByPermissions(ArrayList<String> list);


    int insertPermissions(PermissionsBO permissionsBO);

}
